Skip to content

feat: Add Guida della Matricola page#133

Open
BIA3IA wants to merge 3 commits into
mainfrom
bianca/guidaMatricole
Open

feat: Add Guida della Matricola page#133
BIA3IA wants to merge 3 commits into
mainfrom
bianca/guidaMatricole

Conversation

@BIA3IA

@BIA3IA BIA3IA commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Introduce the Guida della Matricola page, which fetches the latest guide data from the backend and handles cases where no guide is available. Update the CardSplit component to support an action prop for enhanced functionality. Adjust routing for the guide and ensure the header is hidden on the guide page.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds a new "Guida della Matricola" page that fetches and displays the latest guide version with a downloadable PDF link, a server query helper for retrieving that data, an action prop and layout refactor for the CardSplit component, an updated guides constant href, and header suppression on the new route.

Changes

Guida della Matricola feature

Layer / File(s) Summary
Guida matricola data query
src/queries/guida-matricola.ts
New server-only helper queries the latest guide via trpc and returns null or { version, date, url }.
CardSplit action prop and layout
src/components/card-split/types.ts, src/components/card-split/index.tsx
CardSplitProps gains optional action and className props; internal layout switches from a grid to a column-first flex layout with a dedicated container for the action slot.
Guida matricola page
src/app/matricole/guida/page.tsx
New async page exports route metadata, fetches the latest guida, formats the release date, and renders CardSplit with a download link or a fallback message when no guide is available.
Route wiring and header suppression
src/components/matricole/constants.ts, src/components/header/header.tsx
Updates the first guides entry's href to /matricole/guida and makes Header return null when the current pathname is in a new HIDDEN_ROUTES list.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant GuidaMatricolaPage
  participant getLatestGuidaMatricola
  participant CardSplit

  User->>GuidaMatricolaPage: request /matricole/guida
  GuidaMatricolaPage->>getLatestGuidaMatricola: fetch latest guide
  getLatestGuidaMatricola-->>GuidaMatricolaPage: guide or null
  alt guide exists
    GuidaMatricolaPage->>CardSplit: render version, date, download action
  else no guide
    GuidaMatricolaPage->>User: render fallback message
  end
Loading

Possibly related PRs

  • PoliNetworkOrg/web#64: Introduced the CardSplit component that this PR extends with the action prop and layout refactor.
  • PoliNetworkOrg/web#122: Introduced MatricoleGuides/cards consuming the guides constants updated in this PR.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: adding the Guida della Matricola page.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BIA3IA BIA3IA changed the title feat/: Add Guida della Matricola pag feat/: Add Guida della Matricola page Jul 10, 2026
@BIA3IA BIA3IA changed the title feat/: Add Guida della Matricola page feat: Add Guida della Matricola page Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants